package com.issue.system.service.impl;

import java.util.List;

import com.issue.common.core.domain.entity.SysUser;
import com.issue.common.utils.DateUtils;
import com.issue.common.utils.SecurityUtils;
import com.issue.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.issue.system.mapper.AChildInfoMapper;
import com.issue.system.domain.AChildInfo;
import com.issue.system.service.IAChildInfoService;

import javax.annotation.Resource;

/**
 * Child InfoService业务层处理
 * 
 * @author system
 * @date 2024-10-15
 */
@Service
public class AChildInfoServiceImpl implements IAChildInfoService 
{
    @Autowired
    private AChildInfoMapper aChildInfoMapper;


    /**
     * 查询Child Info
     * 
     * @param childId Child Info主键
     * @return Child Info
     */
    @Override
    public AChildInfo selectAChildInfoByChildId(Long childId)
    {
        return aChildInfoMapper.selectAChildInfoByChildId(childId);
    }

    /**
     * 查询Child Info列表
     * 
     * @param aChildInfo Child Info
     * @return Child Info
     */
    @Override
    public List<AChildInfo> selectAChildInfoList(AChildInfo aChildInfo)
    {
        return aChildInfoMapper.selectAChildInfoList(aChildInfo);
    }

    /**
     * 新增Child Info
     * 
     * @param aChildInfo Child Info
     * @return 结果
     */
    @Override
    public int insertAChildInfo(AChildInfo aChildInfo)
    {
        aChildInfo.setCreateTime(DateUtils.getNowDate());
        aChildInfo.setCreateBy(SecurityUtils.getUsername());
        return aChildInfoMapper.insertAChildInfo(aChildInfo);
    }

    /**
     * 修改Child Info
     * 
     * @param aChildInfo Child Info
     * @return 结果
     */
    @Override
    public int updateAChildInfo(AChildInfo aChildInfo)
    {
        aChildInfo.setUpdateTime(DateUtils.getNowDate());
        aChildInfo.setCreateBy(SecurityUtils.getUsername());
        return aChildInfoMapper.updateAChildInfo(aChildInfo);
    }

    /**
     * 批量删除Child Info
     * 
     * @param childIds 需要删除的Child Info主键
     * @return 结果
     */
    @Override
    public int deleteAChildInfoByChildIds(Long[] childIds)
    {
        return aChildInfoMapper.deleteAChildInfoByChildIds(childIds);
    }

    /**
     * 删除Child Info信息
     * 
     * @param childId Child Info主键
     * @return 结果
     */
    @Override
    public int deleteAChildInfoByChildId(Long childId)
    {
        return aChildInfoMapper.deleteAChildInfoByChildId(childId);
    }
}
